package com.kedi.healthcenter.enums;
/**
* @Description:    异常问题枚举类
* @Author:         ytw
* @CreateDate:     2019/7/29 17:38
* @UpdateRemark:   修改内容
* @Version:        1.0
*/
public enum ResultEnum {
    //枚举属性
    PARAMETER_EXISTED(500,"请求参数为空"),
    REQUEST_INVALIDATE(400, "请求数据格式不正确"),
    UPLOAD_ERROR(500, "上传图片出错"),
    DB_RESOURCE_NULL(400, "数据库中没有该资源"),
    LIST_NOT_EXISTED(400,"数据库不存在此数据"),
    USER_NOT_EXISTED(400, "没有此用户"),
    ROLE_NOT_EXISTED(400, "没有此角色"),
    REQUEST_NULL(400, "请求数据格式错误,并且必传参数不能为空"),
    SESSION_TIMEOUT(400, "会话超时"),
    SERVER_ERROR(500, "服务器异常,请联系系统运维人员"),
    EXISTED_THE_RECORD(406, "数据已经存在，不能重复操作"),
    SAVE_DATA_ERROR(407, "数据保存失败,请联系运维人员或检查网络稍后再试!");


    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
